
package com.oahc.magicdefender.data;

import java.util.Map;

import com.oahc.magicdefender.xml.plist.domain.Integer;
import com.oahc.magicdefender.xml.plist.domain.PListObject;
import com.oahc.magicdefender.xml.plist.domain.Real;

public class EnemyAniData {

    private int height, originalHeight, originalWidth, width, x, y;

    private float offsetX, offsetY;

    Map<String, PListObject> dataMap;

    public EnemyAniData(Map<String, PListObject> dataMap) {

        this.dataMap = dataMap;
        setHeight(getIntValue("height"));
        setOffsetX(getFloatValue("offsetX"));
        setOffsetY(getFloatValue("offsetY"));
        setOriginalHeight(getIntValue("originalHeight"));
        setOriginalWidth(getIntValue("originalWidth"));
        setWidth(getIntValue("width"));
        setX(getIntValue("x"));
        setY(getIntValue("y"));

    }

    private java.lang.Integer getIntValue(String key) {
        return ((Integer)dataMap.get(key)).getValue();
    }

    private java.lang.Float getFloatValue(String key) {
        return ((Real)dataMap.get(key)).getValue();
    }

    public int getHeight() {
        return height;
    }

    public void setHeight(int height) {
        this.height = height;
    }

    public float getOffsetX() {
        return offsetX;
    }

    public void setOffsetX(float offsetX) {
        this.offsetX = offsetX;
    }

    public float getOffsetY() {
        return offsetY;
    }

    public void setOffsetY(float offsetY) {
        this.offsetY = offsetY;
    }

    public int getOriginalHeight() {
        return originalHeight;
    }

    public void setOriginalHeight(int originalHeight) {
        this.originalHeight = originalHeight;
    }

    public int getOriginalWidth() {
        return originalWidth;
    }

    public void setOriginalWidth(int originalWidth) {
        this.originalWidth = originalWidth;
    }

    public int getWidth() {
        return width;
    }

    public void setWidth(int width) {
        this.width = width;
    }

    public int getX() {
        return x;
    }

    public void setX(int x) {
        this.x = x;
    }

    public int getY() {
        return y;
    }

    public void setY(int y) {
        this.y = y;
    }

}
